package ac.neec.util;

import java.util.concurrent.TimeUnit;

import android.graphics.YuvImage;

public class CalorieCompute {
	private static final float COEFFICIENT = 1.05F;

	public static int calcCalorie(float mets, float hour, float weight){
		return Math.round(mets * hour * weight * COEFFICIENT);
	}
	public static int calcCalorie(float mets, long msecTime, float weight){
		long hour = TimeUnit.HOURS.convert(msecTime, TimeUnit.MILLISECONDS);
		float min = TimeUnit.MINUTES.convert(msecTime, TimeUnit.MILLISECONDS) % 60;
		min /= 60;
		min += (float)hour;
		return calcCalorie(mets, min, weight);
	}

}
